<?php  
		header("Content-type: text/html; charset=utf-8");
        if($_GET['state']&&$_GET['ID'])
        {
            	$con = mysql_connect(SAE_MYSQL_HOST_M.':'.SAE_MYSQL_PORT,SAE_MYSQL_USER,SAE_MYSQL_PASS); 
             	$dati = date("h:i:sa");
  	        	mysql_select_db("app_cchome", $con);//修改数据库名
				$sql ="UPDATE switch SET timestamp='$dati',state = '2333333'WHERE ID = '5'";//修改开关状态值
				if(!mysql_query($sql,$con))
                {
            		die('Error: ' . mysql_error());
        		}else
                {
                mysql_close($con);
                $contentStr = "success shut light1 ";
        		}  
            echo 	"state:".$state."/ id:".$id;
            
        }		
		echo 	"state:".$state."/ id:".$id;
 
?>